package Interface;
import ea977.Deputado;
import ea977.Projeto;
import ea977.Senador;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;

public class Inicio extends javax.swing.JFrame {

    public Inicio() {
        initComponents();
        PainelErro.setVisible(false);
        PainelNomePolitico.setVisible(false);
        PainelRPolitico.setVisible(false);
        PainelRProjetos.setVisible(false);
        PainelPesquisando.setVisible(false);
    }
    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        PainelPrincipal = new javax.swing.JTabbedPane();
        jInternalFrame1 = new javax.swing.JInternalFrame();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        BotaoPSenador = new javax.swing.JButton();
        BotaoPDeputado = new javax.swing.JButton();
        CaixaEstado = new javax.swing.JComboBox();
        CaixaPartido = new javax.swing.JComboBox();
        jLabel9 = new javax.swing.JLabel();
        jInternalFrame2 = new javax.swing.JInternalFrame();
        jLabel4 = new javax.swing.JLabel();
        PProjetoAssunto = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        PProjetoAutor = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        CaixaPProjeto = new javax.swing.JComboBox();
        jLabel8 = new javax.swing.JLabel();
        BotaoPProjeto = new javax.swing.JButton();
        jLabel10 = new javax.swing.JLabel();
        PainelNomePolitico = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        CaixaNomePolitico = new javax.swing.JComboBox();
        BotaoPPolitico = new javax.swing.JButton();
        PainelRPolitico = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        RPoliticoNome = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        RPoliticoPartido = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        RPoliticoTelefone = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        RPoliticoEndereco = new javax.swing.JTextField();
        BotaoRPolitico = new javax.swing.JButton();
        PainelRProjetos = new javax.swing.JPanel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        RProjetoNumero = new javax.swing.JTextField();
        jLabel21 = new javax.swing.JLabel();
        RProjetoAutores = new javax.swing.JTextField();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        RProjetoLink = new javax.swing.JTextField();
        BotaoAnterior = new javax.swing.JButton();
        BotaoProximo = new javax.swing.JButton();
        BotaoRProjeto = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        RProjetoResumo = new javax.swing.JTextArea();
        PainelErro = new javax.swing.JPanel();
        jLabel24 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        BotaoErro = new javax.swing.JButton();
        PainelPesquisando = new javax.swing.JPanel();
        jLabel15 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setName("Inicial");
        setResizable(false);

        jLayeredPane1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        jLayeredPane1.setMaximumSize(new java.awt.Dimension(480, 320));
        jLayeredPane1.setMinimumSize(new java.awt.Dimension(480, 320));

        PainelPrincipal.setMaximumSize(new java.awt.Dimension(480, 300));
        PainelPrincipal.setMinimumSize(new java.awt.Dimension(480, 300));
        PainelPrincipal.setPreferredSize(new java.awt.Dimension(480, 320));

        jInternalFrame1.setVisible(true);

        jLabel1.setText("Selecione o partido e ou estado do político que deseja pesquisar:");

        jLabel2.setText("Partido");

        jLabel3.setText("Estado");

        BotaoPSenador.setText("Senador");
        BotaoPSenador.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotaoPSenadorActionPerformed(evt);
            }
        });

        BotaoPDeputado.setText("Deputado F.");
        BotaoPDeputado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotaoPDeputadoActionPerformed(evt);
            }
        });

        CaixaEstado.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Todos", "AC", "AL", "AM", "AP", "BA", "CE", "DF", "ES", "GO", "MA", "MG", "MS", "MT", "PA", "PB", "PE", "PI", "PR", "RJ", "RN", "RO", "RR", "RS", "SC", "SE", "SP", "TO" }));
        CaixaEstado.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        CaixaPartido.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Todos", "PMDB", "PTB", "PDT", "PT", "DEM", "PCdoB", "PSB", "PSDB", "PTC", "PSC", "PMN", "PRP", "PPS", "PV", "PTdoB", "PRTB", "PP", "PSTU", "PCB", "PHS", "PSDC", "PCO", "PTN", "PSL", "PRB", "PSOL", "PRPSD", "PPL" }));
        CaixaPartido.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jLabel9.setText("Selecione qual cargo deseja procurar");

        javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout(jInternalFrame1.getContentPane());
        jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);
        jInternalFrame1Layout.setHorizontalGroup(
            jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jInternalFrame1Layout.createSequentialGroup()
                .addGap(98, 98, 98)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel3)
                .addGap(80, 80, 80))
            .addGroup(jInternalFrame1Layout.createSequentialGroup()
                .addGap(67, 67, 67)
                .addComponent(BotaoPSenador, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 130, Short.MAX_VALUE)
                .addComponent(BotaoPDeputado)
                .addGap(76, 76, 76))
            .addGroup(jInternalFrame1Layout.createSequentialGroup()
                .addGap(58, 58, 58)
                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jInternalFrame1Layout.createSequentialGroup()
                        .addComponent(CaixaPartido, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(CaixaEstado, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(31, 31, 31))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jInternalFrame1Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jLabel1)
                        .addGap(68, 68, 68))))
            .addGroup(jInternalFrame1Layout.createSequentialGroup()
                .addGap(137, 137, 137)
                .addComponent(jLabel9)
                .addContainerGap())
        );
        jInternalFrame1Layout.setVerticalGroup(
            jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jInternalFrame1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3))
                .addGap(18, 18, 18)
                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CaixaPartido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CaixaEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 87, Short.MAX_VALUE)
                .addComponent(jLabel9)
                .addGap(18, 18, 18)
                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(BotaoPSenador)
                    .addComponent(BotaoPDeputado))
                .addGap(26, 26, 26))
        );

        PainelPrincipal.addTab("Políticos", jInternalFrame1);

        jInternalFrame2.setVisible(true);

        jLabel4.setText("Preencha os campos com informações de projetos de leis que achar necessário ");

        jLabel5.setText("Autor");

        jLabel6.setText("Assunto");

        CaixaPProjeto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Qualquer", "PMDB", "PTB", "PDT", "PT", "DEM", "PCdoB", "PSB", "PSDB", "PTC", "PSC", "PMN", "PRP", "PPS", "PV", "PTdoB", "PRTB", "PP", "PSTU", "PCB", "PHS", "PSDC", "PCO", "PTN", "PSL", "PRB", "PSOL", "PRPSD", "PPL" }));

        jLabel8.setText("Partido do autor");

        BotaoPProjeto.setText("Pesquisar");
        BotaoPProjeto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotaoPProjetoActionPerformed(evt);
            }
        });

        jLabel10.setText("e clique em \"pesquisar\"");

        javax.swing.GroupLayout jInternalFrame2Layout = new javax.swing.GroupLayout(jInternalFrame2.getContentPane());
        jInternalFrame2.getContentPane().setLayout(jInternalFrame2Layout);
        jInternalFrame2Layout.setHorizontalGroup(
            jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jInternalFrame2Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6)
                    .addComponent(jLabel8))
                .addGap(18, 18, 18)
                .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(PProjetoAssunto, javax.swing.GroupLayout.DEFAULT_SIZE, 241, Short.MAX_VALUE)
                        .addComponent(PProjetoAutor))
                    .addGroup(jInternalFrame2Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(CaixaPProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
            .addGroup(jInternalFrame2Layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addComponent(jLabel7)
                .addContainerGap())
            .addGroup(jInternalFrame2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 441, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(jInternalFrame2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel10)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jInternalFrame2Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(BotaoPProjeto)
                .addGap(190, 190, 190))
        );
        jInternalFrame2Layout.setVerticalGroup(
            jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jInternalFrame2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel10)
                .addGap(16, 16, 16)
                .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(PProjetoAutor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(PProjetoAssunto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6))
                .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jInternalFrame2Layout.createSequentialGroup()
                        .addGap(30, 30, 30)
                        .addComponent(jLabel7))
                    .addGroup(jInternalFrame2Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(CaixaPProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel8))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
                .addComponent(BotaoPProjeto)
                .addGap(34, 34, 34))
        );

        PainelPrincipal.addTab("Projetos", null, jInternalFrame2, "Pesquisa diversas informações de projetos de lei que estão em aberto");

        PainelPrincipal.setBounds(0, 0, 480, 320);
        jLayeredPane1.add(PainelPrincipal, javax.swing.JLayeredPane.DEFAULT_LAYER);
        PainelPrincipal.getAccessibleContext().setAccessibleName("PJ_Pesquisa jurídica");
        PainelPrincipal.getAccessibleContext().setAccessibleDescription("");

        PainelNomePolitico.setMaximumSize(new java.awt.Dimension(480, 300));
        PainelNomePolitico.setMinimumSize(new java.awt.Dimension(480, 300));

        jLabel11.setText("Selecione o político cujas informações deseja consultar");

        BotaoPPolitico.setText("Pesquisar");
        BotaoPPolitico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotaoPPoliticoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout PainelNomePoliticoLayout = new javax.swing.GroupLayout(PainelNomePolitico);
        PainelNomePolitico.setLayout(PainelNomePoliticoLayout);
        PainelNomePoliticoLayout.setHorizontalGroup(
            PainelNomePoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelNomePoliticoLayout.createSequentialGroup()
                .addGroup(PainelNomePoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PainelNomePoliticoLayout.createSequentialGroup()
                        .addGap(170, 170, 170)
                        .addComponent(CaixaNomePolitico, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(PainelNomePoliticoLayout.createSequentialGroup()
                        .addGap(199, 199, 199)
                        .addComponent(BotaoPPolitico)))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PainelNomePoliticoLayout.createSequentialGroup()
                .addGap(0, 120, Short.MAX_VALUE)
                .addComponent(jLabel11)
                .addGap(99, 99, 99))
        );
        PainelNomePoliticoLayout.setVerticalGroup(
            PainelNomePoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelNomePoliticoLayout.createSequentialGroup()
                .addGap(50, 50, 50)
                .addComponent(jLabel11)
                .addGap(61, 61, 61)
                .addComponent(CaixaNomePolitico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE)
                .addComponent(BotaoPPolitico)
                .addGap(43, 43, 43))
        );

        PainelNomePolitico.setBounds(0, 0, 480, 300);
        jLayeredPane1.add(PainelNomePolitico, javax.swing.JLayeredPane.DEFAULT_LAYER);

        PainelRPolitico.setMaximumSize(new java.awt.Dimension(480, 300));
        PainelRPolitico.setMinimumSize(new java.awt.Dimension(480, 300));

        jLabel12.setText("Resultados da pesquisa de político");

        jLabel13.setText("Nome");

        RPoliticoNome.setEditable(false);
        RPoliticoNome.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RPoliticoNomeActionPerformed(evt);
            }
        });

        jLabel14.setText("Partido/UF:");

        RPoliticoPartido.setEditable(false);

        jLabel16.setText("Telefone");

        RPoliticoTelefone.setEditable(false);

        jLabel17.setText("E-Mail");

        RPoliticoEndereco.setEditable(false);

        BotaoRPolitico.setText("Fazer outra pesquisa");
        BotaoRPolitico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotaoRPoliticoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout PainelRPoliticoLayout = new javax.swing.GroupLayout(PainelRPolitico);
        PainelRPolitico.setLayout(PainelRPoliticoLayout);
        PainelRPoliticoLayout.setHorizontalGroup(
            PainelRPoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelRPoliticoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(PainelRPoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PainelRPoliticoLayout.createSequentialGroup()
                        .addGroup(PainelRPoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel13)
                            .addComponent(jLabel14)
                            .addComponent(jLabel16)
                            .addComponent(jLabel17))
                        .addGap(25, 25, 25)
                        .addGroup(PainelRPoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(RPoliticoNome)
                            .addComponent(RPoliticoEndereco)
                            .addGroup(PainelRPoliticoLayout.createSequentialGroup()
                                .addGroup(PainelRPoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(RPoliticoTelefone, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
                                    .addComponent(RPoliticoPartido))
                                .addGap(0, 0, Short.MAX_VALUE)))
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PainelRPoliticoLayout.createSequentialGroup()
                        .addGap(0, 152, Short.MAX_VALUE)
                        .addGroup(PainelRPoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PainelRPoliticoLayout.createSequentialGroup()
                                .addComponent(jLabel12)
                                .addGap(154, 154, 154))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PainelRPoliticoLayout.createSequentialGroup()
                                .addComponent(BotaoRPolitico)
                                .addGap(163, 163, 163))))))
        );
        PainelRPoliticoLayout.setVerticalGroup(
            PainelRPoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelRPoliticoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel12)
                .addGap(18, 18, 18)
                .addGroup(PainelRPoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(RPoliticoNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(PainelRPoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(RPoliticoPartido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(PainelRPoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(RPoliticoTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(PainelRPoliticoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(RPoliticoEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 74, Short.MAX_VALUE)
                .addComponent(BotaoRPolitico)
                .addGap(26, 26, 26))
        );

        PainelRPolitico.setBounds(0, 0, 480, 300);
        jLayeredPane1.add(PainelRPolitico, javax.swing.JLayeredPane.DEFAULT_LAYER);

        PainelRProjetos.setMaximumSize(new java.awt.Dimension(480, 300));
        PainelRProjetos.setMinimumSize(new java.awt.Dimension(480, 300));

        jLabel18.setText("Resultados da pesquisa de projetos de lei");

        jLabel19.setText("Numero/Ano");

        RProjetoNumero.setEditable(false);
        RProjetoNumero.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RProjetoNumeroActionPerformed(evt);
            }
        });

        jLabel21.setText("Autor(es)");

        RProjetoAutores.setEditable(false);
        RProjetoAutores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RProjetoAutoresActionPerformed(evt);
            }
        });

        jLabel22.setText("Resumo");

        jLabel23.setText("Link do projeto");

        RProjetoLink.setEditable(false);
        RProjetoLink.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RProjetoLinkActionPerformed(evt);
            }
        });

        BotaoAnterior.setText("Anterior");
        BotaoAnterior.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotaoAnteriorActionPerformed(evt);
            }
        });

        BotaoProximo.setText("Proximo");
        BotaoProximo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotaoProximoActionPerformed(evt);
            }
        });

        BotaoRProjeto.setText("Fazer outra pesquisa");
        BotaoRProjeto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotaoRProjetoActionPerformed(evt);
            }
        });

        RProjetoResumo.setColumns(20);
        RProjetoResumo.setEditable(false);
        RProjetoResumo.setRows(5);
        jScrollPane1.setViewportView(RProjetoResumo);

        javax.swing.GroupLayout PainelRProjetosLayout = new javax.swing.GroupLayout(PainelRProjetos);
        PainelRProjetos.setLayout(PainelRProjetosLayout);
        PainelRProjetosLayout.setHorizontalGroup(
            PainelRProjetosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelRProjetosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(PainelRProjetosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(PainelRProjetosLayout.createSequentialGroup()
                        .addGroup(PainelRProjetosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PainelRProjetosLayout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(jLabel18))
                            .addGroup(PainelRProjetosLayout.createSequentialGroup()
                                .addComponent(jLabel19)
                                .addGap(27, 27, 27)
                                .addComponent(RProjetoNumero, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(0, 8, Short.MAX_VALUE)))
                        .addGap(137, 137, 137))
                    .addGroup(PainelRProjetosLayout.createSequentialGroup()
                        .addComponent(jLabel23)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PainelRProjetosLayout.createSequentialGroup()
                        .addGroup(PainelRProjetosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(PainelRProjetosLayout.createSequentialGroup()
                                .addComponent(BotaoAnterior)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(BotaoRProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(73, 73, 73)
                                .addComponent(BotaoProximo))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, PainelRProjetosLayout.createSequentialGroup()
                                .addGroup(PainelRProjetosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel21)
                                    .addComponent(jLabel22))
                                .addGap(18, 18, 18)
                                .addGroup(PainelRProjetosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(RProjetoAutores)
                                    .addComponent(jScrollPane1)))
                            .addComponent(RProjetoLink))
                        .addGap(22, 22, 22))))
        );
        PainelRProjetosLayout.setVerticalGroup(
            PainelRProjetosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelRProjetosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel18)
                .addGap(18, 18, 18)
                .addGroup(PainelRProjetosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(RProjetoNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(PainelRProjetosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(RProjetoAutores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(PainelRProjetosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel22)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel23)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(RProjetoLink, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(PainelRProjetosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(BotaoProximo)
                    .addComponent(BotaoRProjeto)
                    .addComponent(BotaoAnterior))
                .addGap(22, 22, 22))
        );

        PainelRProjetos.setBounds(0, 0, 480, 300);
        jLayeredPane1.add(PainelRProjetos, javax.swing.JLayeredPane.DEFAULT_LAYER);

        PainelErro.setMaximumSize(new java.awt.Dimension(480, 300));
        PainelErro.setMinimumSize(new java.awt.Dimension(480, 300));

        jLabel24.setText("ATENÇÃO!");

        jLabel26.setText("Ocorreu um erro durante sua busca");

        jLabel25.setText("Os motivos podem ser:");

        jLabel27.setText("-Os servidores do governo estão fora do ar");

        jLabel28.setText("-Não há resultados para os dados que você inseriu");

        jLabel29.setText("-Você não está conectado à internet");

        jLabel30.setText("Caso deseje tentar novamente, clique no botão abaixo");

        BotaoErro.setText("Nova pesquisa");
        BotaoErro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotaoErroActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout PainelErroLayout = new javax.swing.GroupLayout(PainelErro);
        PainelErro.setLayout(PainelErroLayout);
        PainelErroLayout.setHorizontalGroup(
            PainelErroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelErroLayout.createSequentialGroup()
                .addGroup(PainelErroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PainelErroLayout.createSequentialGroup()
                        .addGap(0, 112, Short.MAX_VALUE)
                        .addComponent(jLabel30, javax.swing.GroupLayout.PREFERRED_SIZE, 358, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(PainelErroLayout.createSequentialGroup()
                        .addGroup(PainelErroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(PainelErroLayout.createSequentialGroup()
                                .addGap(207, 207, 207)
                                .addComponent(jLabel24))
                            .addGroup(PainelErroLayout.createSequentialGroup()
                                .addGap(111, 111, 111)
                                .addComponent(jLabel26))
                            .addGroup(PainelErroLayout.createSequentialGroup()
                                .addGap(52, 52, 52)
                                .addGroup(PainelErroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel25)
                                    .addComponent(jLabel27)
                                    .addComponent(jLabel28)
                                    .addComponent(jLabel29)))
                            .addGroup(PainelErroLayout.createSequentialGroup()
                                .addGap(191, 191, 191)
                                .addComponent(BotaoErro, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        PainelErroLayout.setVerticalGroup(
            PainelErroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelErroLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel24)
                .addGap(18, 18, 18)
                .addComponent(jLabel26)
                .addGap(18, 18, 18)
                .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel27)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel28)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel29)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 81, Short.MAX_VALUE)
                .addComponent(jLabel30)
                .addGap(18, 18, 18)
                .addComponent(BotaoErro)
                .addGap(15, 15, 15))
        );

        PainelErro.setBounds(0, 0, 480, 300);
        jLayeredPane1.add(PainelErro, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel15.setText("Pesquisando, por favor aguarde...");

        javax.swing.GroupLayout PainelPesquisandoLayout = new javax.swing.GroupLayout(PainelPesquisando);
        PainelPesquisando.setLayout(PainelPesquisandoLayout);
        PainelPesquisandoLayout.setHorizontalGroup(
            PainelPesquisandoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelPesquisandoLayout.createSequentialGroup()
                .addGap(127, 127, 127)
                .addComponent(jLabel15)
                .addContainerGap(126, Short.MAX_VALUE))
        );
        PainelPesquisandoLayout.setVerticalGroup(
            PainelPesquisandoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelPesquisandoLayout.createSequentialGroup()
                .addGap(141, 141, 141)
                .addComponent(jLabel15)
                .addContainerGap(145, Short.MAX_VALUE))
        );

        PainelPesquisando.setBounds(0, 0, 420, 300);
        jLayeredPane1.add(PainelPesquisando, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 480, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(106, 106, 106))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(0, 15, Short.MAX_VALUE)
                .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 15, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void BotaoPSenadorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotaoPSenadorActionPerformed
        Senador sn = new Senador();
        Object p=CaixaPartido.getSelectedItem();
        Object e=CaixaEstado.getSelectedItem();
        
        eSenador=true;
        try {
            adicionaCNP(sn.ListagemPoliticos(p.toString(), e.toString()));
        } catch (ParserConfigurationException ex) {
            Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SAXException ex) {
            Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        PainelPrincipal.setVisible(false);
        PainelNomePolitico.setVisible(true);
    }//GEN-LAST:event_BotaoPSenadorActionPerformed

    private void BotaoPDeputadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotaoPDeputadoActionPerformed
        Deputado dp = new Deputado();
        Object p=CaixaPartido.getSelectedItem();
        Object e=CaixaEstado.getSelectedItem();
 
        eSenador=false;
        try {
            adicionaCNP(dp.ListagemPoliticos(p.toString(), e.toString()));
        } catch (ParserConfigurationException ex) {
            Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SAXException ex) {
            Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        PainelPrincipal.setVisible(false);
        PainelNomePolitico.setVisible(true);
    }//GEN-LAST:event_BotaoPDeputadoActionPerformed

    private void BotaoPPoliticoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotaoPPoliticoActionPerformed
        Object nome = CaixaNomePolitico.getSelectedItem();
        if(eSenador){
            Senador politico = new Senador();
            politico.Busca(nome.toString());
            try {
                preencheRPolitico(politico.PegaInfo("rPolitico.xml"));
            } catch (ParserConfigurationException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            } catch (SAXException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            }
        }else{
            Deputado politico = new Deputado();
            politico.Busca(nome.toString());
            try {
                preencheRPolitico(politico.PegaInfo("rPolitico.xml"));
            } catch (ParserConfigurationException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            } catch (SAXException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        CaixaNomePolitico.removeAllItems();
        PainelNomePolitico.setVisible(false);
        PainelRPolitico.setVisible(true);
    }//GEN-LAST:event_BotaoPPoliticoActionPerformed

    private void RPoliticoNomeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RPoliticoNomeActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_RPoliticoNomeActionPerformed

    private void BotaoRPoliticoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotaoRPoliticoActionPerformed
        PainelRPolitico.setVisible(false);
        PainelPrincipal.setVisible(true);
    }//GEN-LAST:event_BotaoRPoliticoActionPerformed

    private void BotaoPProjetoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotaoPProjetoActionPerformed
        PainelPrincipal.setVisible(false);
        PainelPesquisando.setVisible(true);
        Proj=new Projeto();
        Object p=CaixaPProjeto.getSelectedItem();
        if(Proj.BuscaOk(PProjetoAutor.getText(), p.toString(), PProjetoAssunto.getText())){
            try {
                preencheRProjeto(Proj.MostraProjeto(0));
            } catch (ParserConfigurationException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            } catch (SAXException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            PainelPesquisando.setVisible(false);
            PainelRProjetos.setVisible(true);
        }else{
            //rotina de 0 resultados
            PainelPesquisando.setVisible(false);
            PainelErro.setVisible(true);
        }
    }//GEN-LAST:event_BotaoPProjetoActionPerformed

    private void RProjetoNumeroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RProjetoNumeroActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_RProjetoNumeroActionPerformed

    private void RProjetoLinkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RProjetoLinkActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_RProjetoLinkActionPerformed

    private void BotaoAnteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotaoAnteriorActionPerformed
        if(Pagina>0){
            Pagina--;
            try {
                preencheRProjeto(Proj.MostraProjeto(Pagina));
            } catch (ParserConfigurationException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            } catch (SAXException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_BotaoAnteriorActionPerformed

    private void BotaoProximoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotaoProximoActionPerformed
        if(Pagina<(Proj.maximo()-1)){
                Pagina++;
            try {
                preencheRProjeto(Proj.MostraProjeto(Pagina));
            } catch (ParserConfigurationException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            } catch (SAXException ex) {
                Logger.getLogger(Inicio.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_BotaoProximoActionPerformed

    private void BotaoRProjetoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotaoRProjetoActionPerformed
        PainelRProjetos.setVisible(false);
        PainelPrincipal.setVisible(true);
    }//GEN-LAST:event_BotaoRProjetoActionPerformed

    private void BotaoErroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotaoErroActionPerformed
        PainelErro.setVisible(false);
        PainelPrincipal.setVisible(true);
    }//GEN-LAST:event_BotaoErroActionPerformed

    private void RProjetoAutoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RProjetoAutoresActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_RProjetoAutoresActionPerformed

    private void adicionaCNP(String ListaNome[]){
        for(String n:ListaNome){
            CaixaNomePolitico.addItem(n);
        }
    }
    private void preencheRPolitico(String dados[]){
        RPoliticoNome.setText(dados[0]);
        RPoliticoPartido.setText(dados[1]);
        RPoliticoTelefone.setText(dados[2]);
        RPoliticoEndereco.setText(dados[3]);
    }
    private void preencheRProjeto(String dados[]){
        int tamanhoR=dados[2].length();
        int linhasR=tamanhoR/60;
        String nline = "\n";
        RProjetoNumero.setText(dados[0]);
        RProjetoAutores.setText(dados[1]);
        RProjetoResumo.setText("");
        for(int i=0;i<=linhasR;i++){
            if(i==linhasR){
                RProjetoResumo.append(dados[2].substring(60*i, tamanhoR));
            }else{
                RProjetoResumo.append(dados[2].substring(60*i, 60*i+60)+nline);
            }
        }
        RProjetoLink.setText(dados[3]);
    }
    
    
    public static void main(String args[]) {

        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Inicio.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Inicio.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Inicio.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Inicio.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Inicio().setVisible(true);
            }
        });
    }
    private boolean eSenador;
    private int TotalProjetos,Pagina=0;
    private Projeto Proj;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BotaoAnterior;
    private javax.swing.JButton BotaoErro;
    private javax.swing.JButton BotaoPDeputado;
    private javax.swing.JButton BotaoPPolitico;
    private javax.swing.JButton BotaoPProjeto;
    private javax.swing.JButton BotaoPSenador;
    private javax.swing.JButton BotaoProximo;
    private javax.swing.JButton BotaoRPolitico;
    private javax.swing.JButton BotaoRProjeto;
    private javax.swing.JComboBox CaixaEstado;
    private javax.swing.JComboBox CaixaNomePolitico;
    private javax.swing.JComboBox CaixaPProjeto;
    private javax.swing.JComboBox CaixaPartido;
    private javax.swing.JTextField PProjetoAssunto;
    private javax.swing.JTextField PProjetoAutor;
    private javax.swing.JPanel PainelErro;
    private javax.swing.JPanel PainelNomePolitico;
    private javax.swing.JPanel PainelPesquisando;
    private javax.swing.JTabbedPane PainelPrincipal;
    private javax.swing.JPanel PainelRPolitico;
    private javax.swing.JPanel PainelRProjetos;
    private javax.swing.JTextField RPoliticoEndereco;
    private javax.swing.JTextField RPoliticoNome;
    private javax.swing.JTextField RPoliticoPartido;
    private javax.swing.JTextField RPoliticoTelefone;
    private javax.swing.JTextField RProjetoAutores;
    private javax.swing.JTextField RProjetoLink;
    private javax.swing.JTextField RProjetoNumero;
    private javax.swing.JTextArea RProjetoResumo;
    private javax.swing.JInternalFrame jInternalFrame1;
    private javax.swing.JInternalFrame jInternalFrame2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JScrollPane jScrollPane1;
    // End of variables declaration//GEN-END:variables
}
